/*
 * Copyright 2011 J. Auer, J. Andert, F.-J. Jendrusch, U. Celebi
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package de.fuberlin.replication.logging;

/**
 * Logger interface. Use different methods for appropriate priority of the log messages.
 */
public interface Logger {
	/**
	 * DEBUG priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 */
	void d(String tag, String msg);

	/**
	 * DEBUG priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 * @param tr An exception to log
	 */
	void d(String tag, String msg, Throwable tr);

	/**
	 * ERROR priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 */
	void e(String tag, String msg);

	/**
	 * ERROR priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 * @param tr An exception to log
	 */
	void e(String tag, String msg, Throwable tr);

	/**
	 * INFO priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 */
	void i(String tag, String msg);

	/**
	 * INFO priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 * @param tr An exception to log
	 */
	void i(String tag, String msg, Throwable tr);

	/**
	 * VERBOSE priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 */
	void v(String tag, String msg);

	/**
	 * VERBOSE logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 * @param tr An exception to log
	 */
	void v(String tag, String msg, Throwable tr);

	/**
	 * WARN priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 */
	void w(String tag, String msg);

	/**
	 * WARN priority logging.
	 * 
	 * @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
	 *            log call occurs.
	 * @param msg The message you would like logged.
	 * @param tr An exception to log
	 */
	void w(String tag, String msg, Throwable tr);
}